
import type { UctooUser } from '../uctoo_user/types.js';
import { requestClient } from '#/api/request';
import type { Permissions, PermissionsResponse } from './types.js';

export const getUserPermissions = async (data: Partial<UctooUser>) => {
  return requestClient.post<Permissions[]>('/uctoo/permissions/menu/userMenuAll', data);
};

export const getGroupPermissions = async (data: Partial<UctooUser>) => {
  return requestClient.post<Permissions[]>('/uctoo/permissions/getGroupPermissions', data);
};

export const getAllPermissions = async (data: Partial<UctooUser>) => {
  return requestClient.post<Permissions[]>('/uctoo/permissions/menu/all', data);
};

export const loadRouteFromApp = async (data: Partial<UctooUser>) => {
  return requestClient.post<Permissions[]>('/uctoo/permissions/loadRouteFromApp', data);
};

export const getCheckedGroupPermissions = async (data: Partial<UctooUser>) => {
  return requestClient.post<Permissions[]>('/uctoo/permissions/getCheckedGroupPermissions', data);
};
